//
   Created by lenovo on 2016/10/10.

doctype html
html
    head
        title= title
        meta(name='viewport', content='width=device-width, initial-scale=1,maximum-scale=1')
        link(rel='stylesheet',href='http://cdn.bootcss.com/jquery-mobile/1.4.3/jquery.mobile.css')
        script(src='http://cdn.bootcss.com/socket.io/1.3.2/socket.io.js')
        script(src='http://cdn.bootcss.com/jquery/2.1.3/jquery.min.js')
        script(src='http://cdn.bootcss.com/jquery-mobile/1.4.3/jquery.mobile.js')
    body
        div(data-role='page')
            div(data-role='content')
                div.ui-grid-b
                    a#size.ui-btn.ui-btn-inline.ui-block-a(href='#popupMenu_font', data-rel='popup', data-transition='pop',data-position-to="window",danmaku-size= sizes[inits.size].size )= sizes[inits.size].title
                    #popupMenu_font(data-role='popup', data-theme='b',data-overlay-theme='b', style='min-width:210px;')
                        ul(data-role='listview')
                            each val, index in sizes
                                li
                                    a(data-rel='back',danmaku-size=val.size)= val.title
                    a#mode.ui-btn.ui-btn-inline.ui-block-b(href='#popupMenu_mode', data-rel='popup', data-transition='pop',data-position-to="window",danmaku-mode= modes[inits.mode].mode  )= modes[inits.mode].title
                    #popupMenu_mode(data-role='popup', data-theme='b',data-overlay-theme='b', style='min-width:210px;')

                        ul(data-role='listview')
                            each val, index in modes
                                li
                                    a(data-rel='back',danmaku-mode=val.mode)= val.title
                    a#color.ui-btn.ui-btn-inline.ui-block-c(href='#popupMenu_color', data-rel='popup', data-transition='pop',data-position-to="window",danmaku-color= colors[inits.color].color  )= colors[inits.color].title
                    #popupMenu_color(data-role='popup', data-theme='b',data-overlay-theme='b', style='min-width:210px;')
                        .ui-grid-b
                            - var i=0;
                            each val, index in colors
                                case i++ % 3
                                    when 0: a.ui-block-a(data-rel="back", style='background-color:#' + val.color + ';min-height:60px;line-height:60px;text-align:center',danmaku-color=val.color)= val.title
                                    when 1: a.ui-block-b(data-rel="back", style='background-color:#' + val.color + ';min-height:60px;line-height:60px;text-align:center',danmaku-color=val.color)= val.title
                                    when 2: a.ui-block-c(data-rel="back", style='background-color:#' + val.color + ';min-height:60px;line-height:60px;text-align:center',danmaku-color=val.color)= val.title

                textarea#msg(placeholder='来一发弹幕～')
                button#btnSend 发射
        script(src='/javascripts/emit.js')